﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Profil_edit.aspx.cs" Inherits="CPETwit.Web.Pages.Profil_edit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>CPE Tweet - Edition de votre Profil</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="res/css/t1_core_no_hovers.bundle.css" type="text/css" media="screen">
    <link rel="stylesheet" href="res/css/t1_more_no_hovers.bundle.css" type="text/css" media="screen">
    <link rel="stylesheet" href="res/css/t1_core.css" type="text/css" media="screen">
    <link rel="stylesheet" href="res/css/js-user-style.css" type="text/css" media="screen">
    <script type="text/javascript" src="res/js/head_logged_out.js"></script>
    <script type="text/javascript" src="res/js/jquery-1.7.1.min.js"></script>
</head>
<%@ Import Namespace="CPETwit.Data.Entity" %>
<% 
    /* Traitement du design
     * Sexe masculin => design bleu, 
     * féminin => design rose 
     */
    switch (((User)Session["login"]).sex)
    {
        case "M" : 
            Response.Write("<body class='body-male'>");
            break;
        case "F" : 
            Response.Write("<body class='body-female'>");
            break;
    }
    %>
    <div id="doc">
        <div class="topbar js-topbar">
            <div id="banners" class="js-banners">
            </div>
            <div class="global-nav" data-section-term="top_nav">
                <div class="global-nav-inner">
                    <div class="container">
                        <ul class="nav js-global-actions" id="global-actions">
                            <li id="global-nav-home" class="home" data-global-action="home"><a class="js-hover"
                                href="timeline.aspx" data-component-term="home_nav"><span class="new-wrapper"><i
                                    class="nav-home"></i><i class="nav-new"></i></span>Accueil </a></li>
                            <li class="people" data-global-action="connect"><a class="js-hover" href="following.aspx"
                                data-component-term="connect_nav"><span class="new-wrapper"><i class="nav-people"></i>
                                    <i class="nav-new"></i></span>Connecter </a></li>
                            <li class="people active" data-global-action="connect"><a class="js-hover" href="profil.aspx"
                                data-component-term="connect_nav"><span class="new-wrapper"><i class="nav-me"></i><i
                                    class="nav-new"></i></span>Profil </a></li>
                            <li class="people" data-global-action="connect"><a class="js-hover" href="apropos.aspx"
                                data-component-term="connect_nav"><span class="new-wrapper"><i class="nav-topics"></i>
                                    <i class="nav-new"></i></span>A Propos </a></li>
                        </ul>
                        <i class="cpetweet-topbar"></i>
                    </div>
                </div>
            </div>
            <div class="alert-messages" id="message-drawer">
            </div>
        </div>
        <div id="page-outer">
            <div class="alert-messages" id="message-drawer">
            </div>
            <div id="page-container" class="wrapper">
                <div class="dashboard">
                    <div class="module mini-profile">
                        <div class="flex-module profile-summary js-profile-summary">
                            <a href="profil.aspx" class="account-summary account-summary-small">
                                <div class="content">
                                    <div class="account-group js-mini-current-user">
                                    <%
                                        if (((User)Session["login"]).avatar != null)
                                        {
                                            /* Avatar de l'utilisateur */
                                            Response.Write("<img class='avatar size32' id='avatar_preview' src='ImgHandler.ashx?login=" + ((User)Session["login"]).login + "' />");
                                        }
                                        else
                                        {
                                            /* Avatar par défaut */
                                            Response.Write("<img class='avatar size32' id='avatar_preview' src='res/img/hf32.png' />");
                                        }
                                        
                                         %>
                                        <b class="fullname"><% Response.Write(((User)Session["login"]).name); %></b> 
                                        <small class="metadata">Voir ma page de profil</small>
                                    </div>
                                </div>
                            </a>
                        </div>
                    </div>
                    <div class="component" data-component-term="footer">
                            <div class="module site-footer ">
                                <div class="flex-module">
                                    <div class="flex-module-inner js-items-container">
                                        <ul class="clearfix">
                                            <li class="copyright">&copy; 2012 CPE Tweet by CPE School. See "A Propos" section for more
                                                details. </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                </div>
                <div class="content-main">
                    <div class="content-header">
                        <div class="header-inner">
                            <h2>
                                Profil</h2>
                            <p class="subheader">
                                Ces informations figurent sur votre profil public, en résultats de recherches, et
                                plus encore.</p>
                        </div>
                    </div>
                    <div class="content-inner no-stream-end">
                        <form class="form-horizontal" runat="server">
                        <div id="settings-alert-box" class="alert" style="display: none;">
                            <i id="settings-alert-close" class="close"></i>
                        </div>
                        <input type="hidden" name="authenticity_token" value="99488c507f54e5f4f0534a2e568c9a7092a402cb">
                        <input type="hidden" value="PUT" name="_method">
                        <fieldset id="profile-image-controls" class="control-group">
                            <label class="control-label" for="profile_image_uploaded_data">
                                Avatar</label>
                            <div class="controls">
                                <div class="uploader-avatar clearfix">
                                    <%
                                        if (((User)Session["login"]).avatar != null)
                                        {
                                            /* Avatar de l'utilisateur */
                                            Response.Write("<img class='avatar size72' id='avatar_preview' src='ImgHandler.ashx?login=" + ((User)Session["login"]).login + "' />");
                                        }
                                        else
                                        {
                                            /* Avatar par défaut */
                                            Response.Write("<img class='avatar size72' id='avatar_preview' src='res/img/hf128.png' />");
                                        }
                                        
                                         %>

                                    <div class="uploader-tools">
                                        <!-- <input id="profile_image_uploaded_data" name="profile_image[uploaded_data]" size="15" type="file"> -->
                                        <asp:FileUpload id="fileuploadImage" runat="server"></asp:FileUpload>
                                        <p>Taille maximale de 700k. JPG, GIF, PNG.<br></p>
                                    </div>
                                </div>
                            </div>
                        </fieldset>
                        <hr>
                        <fieldset class="control-group">
                            <label class="control-label" for="pseudo">Pseudo</label>
                            <div class="controls">
                                <asp:TextBox runat="server" id="login" size="30"></asp:TextBox>
                            </div>
                        </fieldset>
                        <fieldset id="user_web_fieldset" class="control-group">
                            <label class="control-label" for="user_url">Email</label>
                            <div class="controls">
                                <asp:TextBox runat="server" id="email" size="30"></asp:TextBox>
                                <p>Entrez vos informations d'identification ici.</p>
                            </div>
                            <div class="controls">
                            </div>
                        </fieldset>
                        <hr />
                        <fieldset class="control-group">
                            <label class="control-label" for="user_name">Nom</label>
                            <div class="controls">
                                <asp:TextBox runat="server" id="name" size="30"></asp:TextBox>
                                <p>Entrez votre vrai nom afin que les personnes que vous connaissez puissent vous reconnaître</p>
                            </div>
                        </fieldset>
                        <fieldset class="control-group">
                            <label class="control-label" for="password">Mot de passe</label>
                            <div class="controls">
                                <asp:TextBox runat="server" id="password" size="30"></asp:TextBox>
                                <p>Entrez votre mot de passe</p>
                            </div>
                        </fieldset>
                        <fieldset id="Fieldset1" class="control-group">
                            <label class="control-label" for="birthdate">Date de naissance</label>
                            <div class="controls">
                                <asp:TextBox runat="server" id="birthdate" size="30"></asp:TextBox>
                                <p>Sans indiscrétion bien-sûr.</p>
                            </div>
                            <div class="controls">
                            </div>
                        </fieldset>
                        <fieldset id="Fieldset2" class="control-group">
                            <label class="control-label" for="sexe">Sexe</label>
                            <div class="controls">
                                <asp:RadioButton runat="server" id="Feminin" groupname="Sexe" OnCheckedChanged="RadioButton_Checked"></asp:RadioButton> Féminin
                                <asp:RadioButton runat="server" id="Masculin" groupname="Sexe" OnCheckedChanged="RadioButton_Checked"></asp:RadioButton> Masculin
                            </div>
                            <div class="controls">
                            </div>
                        </fieldset>
                        <fieldset class="control-group">
                            <label class="control-label" for="user_description">Biographie</label>
                            <div class="controls">
                                <asp:TextBox runat="server" id="description" size="30" TextMode="multiline"></asp:TextBox>
                                <p>Présentez-vous en moins de <strong>160</strong> caractères.</p>
                            </div>
                        </fieldset>
                        <div class="form-actions">
                            <asp:button onClick="saveUser" cssClass="btn primary-btn" runat="server" text="Sauvegarder les modifications" />
                            <!--<input type="submit" name="settings_save" class="btn primary-btn" value="Sauvegarder les modifications"/>-->
                        </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
